home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / List.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  4KB  |  182 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // List.h
  5. //
  6. // API for the package List.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /flux/packages/List.h 10    23/02/01 14:35 Carl $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(List);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "List" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24. #else
  25.  
  26. // Declare the script object type as a script list object
  27. object list ( FcScriptList );
  28.  
  29. // Include set so that conversion functions can be written
  30. uses Set;
  31.  
  32. //
  33. // hobject List.Head( ref list the_list )
  34. //
  35. // Accessor for the head of the list
  36. //
  37. prototype hobject List.Head( ref list the_list );
  38.  
  39. //
  40. // hobject List.Tail( ref list the_list )
  41. //
  42. // Accessor for the tail of the list
  43. //
  44. prototype hobject List.Tail( ref list the_list );
  45.  
  46. //
  47. // hobject List.GetNth( ref list the_list, int N )
  48. //
  49. // Accessor for the Nth handle stored in the_list
  50. //
  51. prototype hobject List.GetNth( ref list the_list, int N );
  52.  
  53. //
  54. // hobject List.SetNth( ref list the_list, int N, hobject the_handle )
  55. //
  56. // Settor for the Nth handle stored in the list
  57. //
  58. prototype hobject List.SetNth( ref list the_list, int N, hobject the_handle );
  59.  
  60. //
  61. // List.AddHead( ref the_list, hobject the_handle )
  62. //
  63. // Add a handle to the head (top) of the_list
  64. //
  65. prototype List.AddHead( ref list the_list, hobject the_handle );
  66.  
  67. //
  68. // ref List.AddTail( ref the_list, hobject the_handle )
  69. //
  70. // Add a handle to the tail (end) of the_list
  71. //
  72. prototype List.AddTail( ref list the_list, hobject the_handle );
  73.  
  74. //
  75. // List.Append( ref list_one, list list_two )
  76. //
  77. // Append list_two onto the end of list_one and return this new list
  78. //
  79. prototype List.Append( ref list list_one, ref list list_two );
  80.  
  81. //
  82. // List.RemoveHead( ref list the_list )
  83. //
  84. // Removes the head of the_list
  85. //
  86. prototype List.RemoveHead( ref list the_list );
  87.  
  88. //
  89. // List.RemoveTail( ref list the_list )
  90. //
  91. // Removes the tail of the_list
  92. //
  93. prototype List.RemoveTail( ref list the_list );
  94.  
  95. //
  96. // List.Remove( ref list the_list, hobject the_handle )
  97. //
  98. // Removes the_handle from the_list
  99. //
  100. prototype List.Remove( ref list the_list, hobject the_handle );
  101.  
  102. //
  103. // List.RemoveNth( ref list the_list, int N )
  104. //
  105. // Removes the Nth handle from the_list
  106. //
  107. prototype List.RemoveNth( ref list the_list, int N );
  108.  
  109. //
  110. // List.RemoveMembers( ref list the_list, ref list the_members )
  111. //
  112. // Removes all of the_members from the_list
  113. //
  114. prototype List.RemoveMembers( ref list the_list, ref list the_members );
  115.  
  116. //
  117. // List.RemoveAll( ref list the_list )
  118. //
  119. // Removes all elements from the_list
  120. //
  121. prototype List.RemoveAll( ref list the_list );
  122.  
  123. //
  124. // bool List.IsEmpty( ref list the_list )
  125. //
  126. // Returns true if the list is empty
  127. //
  128. prototype bool List.IsEmpty( ref list the_list );
  129.  
  130. //
  131. // int List.ItemCount( ref list the_list )
  132. //
  133. // Returns the number of items in the_list
  134. //
  135. prototype int List.ItemCount( ref list the_list );
  136.  
  137. //
  138. // bool List.Contains( ref list the_list, hobject the_handle )
  139. //
  140. // Returns true if the_list contains the_handle
  141. //
  142. prototype bool List.Contains( ref list the_list, hobject the_handle );
  143.  
  144. //
  145. // list List.FromSet( set the_set )
  146. //
  147. // Returns a list that contains all the elements of the set
  148. //
  149. prototype list List.FromSet( ref set the_set );
  150.  
  151. //
  152. // list List.SortByStringProperty( ref set the_set, ref string property )
  153. //
  154. // Return a list from the set sorted in alphanumeric order of the given property
  155. //
  156. prototype list List.SortByStringProperty( ref list the_list, ref string property );
  157.  
  158.  
  159. //
  160. // list List.SortByStringProperty( ref set the_set, ref string property )
  161. //
  162. // Return a list from the set sorted in numeric order of the given property
  163. //
  164. prototype list List.SortByIntProperty( ref list the_list, ref string property );
  165.  
  166.  
  167. //
  168. // list List.SortByFloatProperty( ref set the_set, ref float property )
  169. //
  170. // Return a list from the set sorted in float order of the given property
  171. //
  172. prototype list List.SortByFloatProperty( ref list the_list, ref string property );
  173.  
  174. //
  175. // list List.SortByHandle( ref set the_set )
  176. //
  177. // Return a list from the set sorted by handle id.
  178. //
  179. prototype list List.SortByHandle( ref list the_list );
  180.  
  181. #endif // FLUX_LIB
  182.